<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>FCKImagePreloader</title>
	<script src="../../../editor/_source/fckscriptloader.js" type="text/javascript"></script>
	<script src="../_common/manual_test.js" type="text/javascript"></script>
	<script type="text/javascript">

FCKScriptLoader.Load( 'FCKImagePreloader' ) ;

	</script>
	<script type="text/javascript">

window.onload = function()
{
	var oPreloader = new FCKImagePreloader() ;
	oPreloader.AddImages( [ '../_common/strip.gif', '../_common/check.gif' ] ) ;
	oPreloader.AddImages( '../_common/smiley.gif;../_common/arrowdown.gif' ) ;
	oPreloader.OnComplete = LoadImages ;
	oPreloader.Start() ;

	// To test the undesired behavior, just comment the above Start() call and
	// uncomment the following line.
	// LoadImages() ;
}

function LoadImages()
{
	var sHtml1 = '' ;
	var sHtml2 = '' ;
	var sHtml3 = '' ;
	var sHtml4 = '' ;

	for ( var i = 0 ; i < 10 ; i++ )
	{
		sHtml1 += '<img src="../_common/strip.gif" />' ;
		sHtml2 += '<img src="../_common/check.gif" />' ;
		sHtml3 += '<img src="../_common/smiley.gif" />' ;
		sHtml4 += '<img src="../_common/arrowdown.gif" />' ;
	}

	document.body.innerHTML += sHtml1 + sHtml2 + sHtml3 + sHtml4 ;
}

	</script>
</head>
<body>
	<h1>
		FCKImagePreloader
	</h1>
	<p>
		Cleanup your browser cache. Load this page and watch the communications using Fiddler.
		You must have just one HTTP 200 response for "strip.gif", "check.gif", "smiley.gif"
		and "arrowdown.gif". All other responses for those files must be HTTP 304 (browser
		cache), if any.
	</p>
	<p>
		This is a IE only issue. Other browser will perform well whithout FCKScriptLoader.
	</p>
</body>
</html>
